<template>
	<view :style="{ height: statusBarHeight }" class="uni-status-bar" @touchmove.stop.prevent="stopPenetrate"></view>
</template>

<script>
var statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
console.log(statusBarHeight, 'statusBarHeight');
export default {
	name: 'UniStatusBar',
	data() {
		return {
			statusBarHeight: statusBarHeight
		};
	},
	methods: {
		// 防止触摸穿透(避免底部元素滚动或被点击)
		stopPenetrate() {
			return;
		}
	}
};
</script>

<style scoped>
.uni-status-bar {
	width: 100vw;
	/* height: 40upx; */
	height: 88rpx;
}
</style>
